Packet processing method, device, and system

ABSTRACT

The present disclosure discloses a packet processing method, device, and system. The system includes: a controller, configured to: allocate a service label to a service processing manner of an FEC, establish a mapping relationship between the service label and the service processing manner, send the service label to a source node, and send the mapping relationship to a destination node; the source node, configured to: receive the service label sent by the controller, receive a first packet, insert the service label to the first packet to obtain a second packet, and send the second packet to the destination node; the destination node, configured to: receive the mapping relationship sent by the controller, receive the second packet sent by the source node, and pop the service label from the second packet according to the mapping relationship, to obtain the first packet.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/926,872 filed on Mar. 20, 2018, which is a continuation ofInternational Patent Application No. PCT/CN2016/096572, filed on Aug.24, 2016, which claims priority to Chinese Patent Application No.201510608874.X, filed on Sep. 22, 2015. The disclosures of theaforementioned applications are hereby incorporated by reference intheir entireties.

TECHNICAL FIELD

The present disclosure relates to the field of communicationstechnologies, and in particular, to a packet processing method, device,and system.

BACKGROUND

In a network environment, a packet needs to be forwarded from a sourcenode to a destination node along a forwarding path, so that a datapacket is forwarded, and data is transmitted. The source node is alsoreferred to as an ingress node (Ingress Node), and the destination nodeis also referred to as an egress node (Egress Node). For a networkenvironment that supports multiprotocol label switching (MPLS),different mechanisms may be selected to forward packets, such as anInternet Protocol (IP) routing mechanism, an MPLS mechanism, and asegment routing (SR) mechanism. In packet forwarding mechanisms such asthe MPLS mechanism and the segment routing mechanism, the forwardingpath is also referred to as a label switched path (LSP).

In a process of forwarding a packet in a network, some serviceprocessing needs to be performed on the packet sometimes. For example,when a forwarding node on a forwarding path of the packet has multiplelinks for selection, to implement load balance on the forwarding node,the forwarding node needs to select, according to a load status of eachlink, a link to forward the packet.

In the prior art, for a forwarding equivalence class (FEC), to performservice processing on a packet corresponding to the FEC in a forwardingprocess of the packet, some forwarding nodes on a forwarding path of theFEC need to be statically configured, so that these forwarding nodes canprocess, in a statically configured service processing manner, thepacket corresponding to the FEC. However, because there are a largequantity of FECs in the network environment, and a service processingmanner of each FEC needs to be configured for different forwardingnodes, a large quantity of forwarding nodes in the network need to bestatically configured. Consequently, work of configuring and maintainingservice processing for the network environment is extremely complex, andit is difficult to flexibly implement various service processing in thenetwork environment.

SUMMARY

Embodiments of the present disclosure provide a packet processing methodand device, to resolve a prior-art technical problem of complex networkconfiguration and maintenance that is caused because a forwarding nodeis statically configured to implement service processing.

According to a first aspect, an embodiment of the present disclosureprovides a packet processing system, and the system includes:

a controller, configured to: allocate a service label to a serviceprocessing manner of a forwarding equivalence class FEC, establish amapping relationship between the service label and the serviceprocessing manner, send the service label to a source node correspondingto the FEC, and send the mapping relationship to a destination nodecorresponding to the FEC;

the source node, configured to: receive the service label that iscorresponding to the FEC and that is sent by the controller, receive afirst packet corresponding to the FEC, insert the service label to thefirst packet to obtain a second packet, and send the second packet tothe destination node corresponding to the FEC; and

the destination node, configured to: receive the mapping relationshipsent by the controller, receive the second packet sent by the sourcenode corresponding to the FEC, and pop the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, that the controller sends the service label to the sourcenode includes:

binding, by the controller, the service label to routing informationcorresponding to the FEC; and

sending, by the controller, the routing information bound with theservice label to the source node.

Optionally, that the controller sends the mapping relationship to thedestination node includes:

inserting, by the controller, the service label and the serviceprocessing manner to network layer reachability informationcorresponding to the FEC, to form, in the network layer reachabilityinformation, the mapping relationship between the service label and theservice processing manner; and

sending the network layer reachability information to the destinationnode.

Optionally, the service processing manner is to perform load sharingprocessing on a packet, the network device is an intermediate node on aforwarding path from the source node to the destination node, and theservice label is an inner label in a label stack of the second packet.

According to a second aspect, an embodiment of the present disclosureprovides a packet processing method, and the method includes:

allocating, by a controller, a service label to a service processingmanner of a forwarding equivalence class FEC, and establishing a mappingrelationship between the service label and the service processingmanner;

sending, by the controller, the service label corresponding to the FECto a source node corresponding to the FEC, so as to instruct the sourcenode to insert the service label to a first packet corresponding to theFEC, to obtain a second packet; and

sending, by the controller, the mapping relationship to a destinationnode corresponding to the FEC, so as to instruct the destination node topop the service label from the second packet according to the mappingrelationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, the sending, by the controller, the service labelcorresponding to the FEC to a source node corresponding to the FEC, soas to instruct the source node to insert the service label to a firstpacket corresponding to the FEC, to obtain a second packet includes:

binding, by the controller, the service label to routing informationcorresponding to the FEC; and

sending, by the controller, the routing information bound with theservice label to the source node, so as to instruct the source node toinsert the service label to the first packet, to obtain the secondpacket.

Optionally, the sending, by the controller, the mapping relationship toa destination node corresponding to the FEC, so as to instruct thedestination node to pop the service label from the second packetaccording to the mapping relationship, to obtain the first packetincludes:

inserting, by the controller, the service label and the serviceprocessing manner to network layer reachability informationcorresponding to the FEC, to form, in the network layer reachabilityinformation, the mapping relationship between the service label and theservice processing manner; and

sending, by the controller, the network layer reachability informationto the destination node, so as to instruct the destination node to popthe service label from the second packet according to the mappingrelationship, to obtain the first packet.

According to a third aspect, an embodiment of the present disclosureprovides another packet processing method, and the method includes:

receiving, by a source node, a service label that is corresponding to aforwarding equivalence class FEC and that is sent by a controller, wherethe service label is allocated by the controller to a service processingmanner of the FEC, and the source node is a source node corresponding tothe FEC;

receiving, by the source node, a first packet corresponding to the FEC,and inserting the service label to the first packet, to obtain a secondpacket; and

sending, by the source node, the second packet to a destination nodecorresponding to the FEC, so as to instruct the destination nodecorresponding to the FEC to pop the service label from the second packetaccording to a mapping relationship between the service label and theservice processing manner, to obtain the first packet, where the mappingrelationship is established by the controller and sent to thedestination node.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, the receiving, by a source node, a service label that iscorresponding to an FEC and that is sent by a controller includes:

receiving, by the source node, routing information that is correspondingto the FEC and that is sent by the controller; and

obtaining, by the source node, the service label bound to the routinginformation.

According to a fourth aspect, an embodiment of the present disclosureprovides still another packet processing method, and the methodincludes:

receiving, by a destination node, a mapping relationship that is betweena service label and a service processing manner and that is sent by acontroller, where the service label is allocated by the controller tothe service processing manner of a forwarding equivalence class FEC, andthe destination node is a destination node corresponding to the FEC;

receiving, by the destination node, a second packet that is sent by asource node corresponding to the FEC, where the second packet isobtained by inserting, by the source node, the service label to a firstpacket corresponding to the FEC; and popping, by the destination node,the service label from the second packet according to the mappingrelationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, the receiving, by a destination node, a mapping relationshipbetween a service label and a service processing manner includes:

receiving, by the destination node, network layer reachabilityinformation that is corresponding to the FEC and that is sent by thecontroller; and

obtaining, by the destination node, the service label and the serviceprocessing manner from the network layer reachability information, toobtain the mapping relationship between the service label and theservice processing manner.

According to a fifth aspect, an embodiment of the present disclosureprovides a controller, and the controller includes:

an allocation module, configured to allocate a service label to aservice processing manner of a forwarding equivalence class FEC;

an establishment module, configured to establish a mapping relationshipbetween the service label and the service processing manner;

a first sending module, configured to send the service labelcorresponding to the FEC to a source node corresponding to the FEC, soas to instruct the source node to insert the service label to a firstpacket corresponding to the FEC, to obtain a second packet; and

a second sending module, configured to send the mapping relationship toa destination node corresponding to the FEC, so as to instruct thedestination node to pop the service label from the second packetaccording to the mapping relationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, the first sending module includes:

a binding submodule, configured to bind the service label to routinginformation corresponding to the FEC; and

a first sending submodule, configured to send the routing informationbound with the service label to the source node, so as to instruct thesource node to insert the service label to the first packet, to obtainthe second packet.

Optionally, the second sending module includes:

an insertion submodule, configured to insert the service label and theservice processing manner to network layer reachability informationcorresponding to the FEC, to form, in the network layer reachabilityinformation, the mapping relationship between the service label and theservice processing manner; and

a second sending submodule, configured to send the network layerreachability information to the destination node, so as to instruct thedestination node to pop the service label from the second packetaccording to the mapping relationship, to obtain the first packet.

According to a sixth aspect, an embodiment of the present disclosureprovides a source node device, and the device includes:

a first receiving module, configured to receive a service label that iscorresponding to a forwarding equivalence class FEC and that is sent bya controller, where the service label is allocated by the controller toservice processing manner of the FEC, and the source node is a sourcenode corresponding to the FEC;

a second receiving module, configured to receive a first packetcorresponding to the FEC;

an insertion module, configured to insert the service label to the firstpacket, to obtain a second packet; and

a first sending module, configured to send the second packet to adestination node corresponding to the FEC, so as to instruct thedestination node corresponding to the FEC to pop the service label fromthe second packet according to a mapping relationship between theservice label and the service processing manner, to obtain the firstpacket, where the mapping relationship is established by the controllerand sent to the destination node.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

According to a seventh aspect, an embodiment of the present disclosureprovides a destination node device, and the device includes:

a first receiving module, configured to receive a mapping relationshipthat is between a service label and a service processing manner and thatis sent by a controller, where the service label is allocated by thecontroller to the service processing manner of a forwarding equivalenceclass FEC, and the destination node is a destination node correspondingto the FEC;

a second receiving module, configured to receive a second packet that issent by a source node corresponding to the FEC, where the second packetis obtained by inserting, by the source node, the service label to afirst packet corresponding to the FEC; and

a popping module, configured to pop the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Compared with the prior art, embodiments of the present disclosure haveat least the following advantages:

According to the technical solutions in the embodiments of the presentdisclosure, the controller allocates the service label, delivers theservice label to the source node, and delivers the mapping relationshipbetween the service label and the service processing manner to thedestination node. The source node can insert, without staticconfiguration, the service label to the packet, and the destination nodecan pop, without static configuration, the service label from thepacket. In this way, in the process of forwarding the packet from thesource node to the destination node, the network device can performservice processing on the packet according to the service label in thepacket. It can be seen that service processing can be performed on thepacket in the forwarding process of the packet without staticallyconfiguring a forwarding node. Therefore, a quantity of devices thatneed to be statically configured is reduced significantly, and work ofconfiguring and maintaining service processing for a network environmentis simplified, so that various service processing in the networkenvironment can be flexibly implemented. In addition, the controllerallocates the service label, delivers the service label to the sourcenode, and delivers the mapping relationship to the destination node, sothat the packet carries, in the forwarding process, service labels thatare used to carry multiple different service processing requirements,and the service labels can flexibly form various combinations and beinserted to the packet, so that the packet is flexibly processedaccording to various combinations of service processing manners.Therefore, an MPLS label can be flexibly applied to an applicationscenario with multiple service requirements.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of thisapplication more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments or theprior art. Apparently, the accompanying drawings in the followingdescription show merely some embodiments recorded in this application,and persons of ordinary skill in the art may still derive other drawingsfrom these accompanying drawings.

FIG. 1 is a schematic diagram of a system framework related to anapplication scenario according to an embodiment of the presentdisclosure;

FIG. 2 is a schematic structural diagram of a packet processing systemaccording to an embodiment of the present disclosure;

FIG. 3 is a schematic diagram of a format of network layer reachabilityinformation according to an embodiment of the present disclosure;

FIG. 4 is a schematic diagram of a format of a network layerreachability information field according to an embodiment of the presentdisclosure;

FIG. 5 is a schematic diagram of a packet label according to anembodiment of the present disclosure;

FIG. 6 is a schematic flowchart of a packet processing method accordingto an embodiment of the present disclosure;

FIG. 7 is a schematic flowchart of another packet processing methodaccording to an embodiment of the present disclosure;

FIG. 8 is a schematic flowchart of still another packet processingmethod according to an embodiment of the present disclosure;

FIG. 9 is a schematic flowchart of yet another packet processing methodaccording to an embodiment of the present disclosure;

FIG. 10 is a schematic structural diagram of a packet processingcontroller according to an embodiment of the present disclosure;

FIG. 11 is a schematic structural diagram of a source node device forpacket processing according to an embodiment of the present disclosure;

FIG. 12 is a schematic structural diagram of a destination node devicefor packet processing according to an embodiment of the presentdisclosure;

FIG. 13 is a schematic structural diagram of a controller according toan embodiment of the present disclosure;

FIG. 14 is a schematic structural diagram of a source node deviceaccording to an embodiment of the present disclosure; and

FIG. 15 is a schematic structural diagram of a destination node deviceaccording to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

To make persons skilled in the art understand the technical solutions inthe present disclosure better, the following clearly describes thetechnical solutions in the embodiments of the present disclosure withreference to the accompanying drawings in the embodiments of the presentdisclosure. Apparently, the described embodiments are merely a partrather than all of the embodiments of the present disclosure.

It is found that, to perform service processing on a packet in a networkenvironment, and considering that there are usually multiple FECs in thenetwork environment and packets corresponding to different FECs need tobe processed in different service processing manners, a network deviceneeds to specifically perform service processing on the packet.Therefore, in a forwarding process of the packet, indication informationused to identify a service processing manner may be added to the packet,so that the network device can determine, by reading the indicationinformation, to perform corresponding service processing on the packet.To enable the packet to have the indication information in theforwarding process, the indication information needs to be added to thepacket on a source node on a forwarding path, and the indicationinformation needs to be popped on a destination node on the forwardingpath. Therefore, in the prior art, for an FEC, a source node and adestination node corresponding to the FEC need to be staticallyconfigured, so that the source node can add the indication informationto a packet corresponding to the FEC, and the destination node can popindication information from the packet corresponding to the FEC.However, in an actual network, there may be a large quantity offorwarding nodes between the source node and the destination nodecorresponding to the FEC. Therefore, in the prior art, to implementservice processing in a network environment, the large quantity offorwarding nodes need to be statically configured. Consequently, networkconfiguration and maintenance work is extremely complex, and it isdifficult to flexibly implement service processing.

Referring to FIG. 1, FIG. 1 is a schematic diagram of an applicationnetwork scenario in an implementation of the present disclosure. Thenetwork scenario includes a controller (controller) 101, a forwardingnode 102, and a forwarding node 103. The controller 101 may be acontroller in a network architecture in which control is separated fromforwarding, and the forwarding node 102 and the forwarding node 103 maybe forwarding nodes in the network architecture in which control isseparated from forwarding. For an FEC, on a forwarding pathcorresponding to the FEC, the forwarding node 102 is a source node, andthe forwarding node 103 is a destination node. In the network scenarioshown in FIG. 1, the controller 101 may allocate a service label to aservice processing manner of the FEC, and establish a mappingrelationship between the service label and the service processingmanner. The controller 101 may send the service label to the forwardingnode 102, and send the mapping relationship to the forwarding node 103.When receiving a first packet corresponding to the FEC, the forwardingnode 102 may insert the service label that is received from thecontroller 101 to the first packet, to obtain a second packet, and sendthe second packet to the forwarding node 103. When receiving the secondpacket, the forwarding node 103 may pop the service label from thesecond packet according to the mapping relationship that is receivedfrom the controller 101, to obtain the first packet. In a process offorwarding the second packet from the forwarding node 102 to theforwarding node 103, a network device that needs to perform serviceprocessing on the second packet may select the corresponding serviceprocessing manner according to the service label in the second packet,to process the second packet.

In the foregoing application scenario, on the forwarding path from theforwarding node 102 to the forwarding node 103, the packet correspondingto the FEC may not pass through any intermediate node, or may passthrough one or more intermediate nodes. This is not limited in thisembodiment of the present disclosure.

It should be noted that the foregoing application scenario is shownmerely for facilitating understanding of a principle of the presentdisclosure, and an implementation of the present disclosure is notlimited in this aspect. The implementation of the present disclosure maybe applied to any applicable scenario.

Implementations of a packet processing method, a related device, and arelated system in the present disclosure are described in detail belowby using embodiments and with reference to the accompanying drawings.

Referring to FIG. 2, FIG. 2 is a schematic diagram of a packetprocessing system according to an embodiment of the present disclosure.In this embodiment, the system includes:

a controller 201, configured to: allocate a service label to a serviceprocessing manner corresponding to an FEC, establish a mappingrelationship between the service label and the service processingmanner, send the service label corresponding to the FEC to a source node202 corresponding to the FEC, and send the mapping relationship to adestination node 203 corresponding to the FEC;

the source node 202, configured to: receive the service label that iscorresponding to the FEC and that is sent by the controller 201, receivea first packet corresponding to the FEC, insert the service label to thefirst packet to obtain a second packet, and send the second packet tothe destination node 203 corresponding to the FEC; and

the destination node 203, configured to: receive the mappingrelationship sent by the controller 201, receive the second packet sentby the source node 202 corresponding to the FEC, and pop the servicelabel from the second packet according to the mapping relationship, toobtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node 202 to the destination node 203,a network device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

In this embodiment, for any FEC in a network environment, the controller201 may configure a corresponding service processing manner for the FEC.Specifically, the controller 201 may allocate, according to a serviceprocessing manner in which a packet corresponding to the FEC needs to beperformed, a service label that is used to identify the serviceprocessing manner to the FEC, and establish a mapping relationshipbetween the service label and the service processing manner. Then, thecontroller 201 may deliver the service label to the source node 202corresponding to the FEC, so that the source node 202 may save theservice label and the FEC. The controller 201 may deliver the mappingrelationship to the destination node 203 corresponding to the FEC, sothat the destination node 203 saves the mapping relationship. If thesource node 202 stores the service label corresponding to the FEC, whenreceiving a first packet corresponding to the FEC, the source node 202may insert the service label to the first packet to obtain a secondpacket, and send the second packet to the destination node 203. When thedestination node 203 receives the second packet, the destination node203 may identify, according to the mapping relationship, the servicelabel that is inserted to the second packet, and pop the service labelfrom the second packet, to obtain the first packet. Therefore, a processof forwarding the first packet in the network environment is completed.In the process of forwarding the second packet from the source node 202to the destination node 203, the network device that needs to performservice processing on the second packet may determine, by reading theservice label in the second packet, that the second packet iscorresponding to the service processing manner, so that the secondpacket can be processed in the service processing manner.

In this embodiment, a sequence of performing the action of deliveringthe service label by the controller 201 and the action of delivering themapping relationship by the controller 201 may not be limited. Forexample, the controller 201 may deliver the service label to the sourcenode 202 and deliver the mapping relationship to the destination node203 at the same time. For another example, the controller 201 may firstdeliver the mapping relationship to the destination node 203, and thendeliver the service label to the source node 202.

The FEC in this embodiment may be an FEC that is formed by classifyinggroups in any manner. For example, groups may be classified by using IPaddress prefixes of destination addresses to form the FEC, that is,packets corresponding to a same FEC have destination addresses with asame IP address prefix. In this case, when the controller 201 allocatesthe service label to the service processing manner of the FEC, thecontroller 201 may bind the service label and the IP address prefix, andsend the service label and the IP address prefix to the source node 202,and the source node 202 may save the service label and the IP addressprefix. In this way, when receiving a packet, the source node 202 mayidentify a destination address of the packet. If the source node 202learns after identification that the destination address of the packethas the IP address prefix, the source node 202 may insert, to thepacket, the saved service label corresponding to the IP address prefix.

In a specific implementation, to enable the controller 201 to deliverthe service label corresponding to the FEC to the source node 202, thecontroller 201 may deliver routing information corresponding to the FECto the source node 202. Specifically, the controller 201 binds theservice label to the routing information corresponding to the FEC, andthe controller 201 sends the routing information to the source node 202.The service label corresponding to the FEC may be bound to the routinginformation corresponding to the FEC by extending the Border GatewayProtocol (BGP). Specifically, the routing information corresponding tothe FEC may be carried in network layer reachability information (NLRI)of the BGP. The service label corresponding to the FEC may be used as aBGP attribute and bound to the NLRI that carries the routinginformation. In this way, the controller 201 delivers the network layerreachability information to the source node 202, so that the routinginformation and the service label that are corresponding to the FEC canbe delivered to the source node 202.

In a specific implementation, to enable the controller 201 to deliverthe mapping relationship between the service label and the serviceprocessing manner to the destination node 203, the mapping relationshipmay be carried in the NLRI of the BGP, and the controller 201 deliversthe NLRI to the destination node 203, to deliver the mappingrelationship. Specifically, the controller 201 inserts the service labeland the service processing manner to the NLRI corresponding to the FEC,to form, in the NLRI, the mapping relationship between the service labeland the service processing manner. The controller 201 sends the NLRI tothe destination node 203.

To add the mapping relationship to the NLRI, multiprotocol reachableNLRI (MP_Reach_NLRI) shown in FIG. 3 may be obtained by extending theBGP, and the MP_Reach_NLRI may be used to carry the mappingrelationship.

“Address Family Identifier” is an address family identifier field, andthis field is used to carry an address family identifier of a networkprotocol, such as an IPv4 (Internet Protocol version 4) identifier andan IPv6 (Internet Protocol version 6) identifier.

“Subsequent Address Family” is a subsequent address family identifierfield, and this field is used to carry identification information of anNLRI type. For an NLRI type indicating that the NLRI carries the mappingrelationship, another piece of identification information may be added,and the identification information is used to indicate that the NLRIincludes the mapping relationship.

Two “Reserved” are both reserved fields.

“Network Address of Next Hop” is a next-hop network address field, andthis field is used to carry an address of a next forwarding node on aroute.

“Network Layer Reachability Information” is a network layer reachabilityinformation field, and for the NLRI that carries the mappingrelationship, this field may be used to carry the mapping relationship.

The NLRI field may carry the mapping relationship by using a formatshown in FIG. 4.

“NLRI Type” is an NLRI type field, and this field is used to carry atype of a service label, the type of the service label may be used torepresent a service processing manner corresponding to the servicelabel, for example, if the type of the service label is an entropylabel, that is, the service label is an entropy label, a serviceprocessing manner corresponding to the entropy label is a load sharingservice.

“NLRI Length” is an NLRI length field, and this field is used to carryinformation that indicates an NLRI field length.

“SID/Label/Index” is a service identifier field, and this field may beused to carry a service identifier (SID), a service label (Label), or anindex.

“Type Specific Value” is a type specific value field, and this field isused to carry description information of a service processing manner.

It can be seen that, in the NLRI field format shown in FIG. 4, theservice label may be inserted to the SID/Label/Index field, and theservice processing manner may be inserted to the type specific valuefield, so that the MP_Reach_NLRI can carry the mapping relationshipbetween the service label and the service processing manner. Thecontroller 201 delivers the MP_Reach_NLRI to the destination node 203,and the destination node 203 may learn, by means of reading, that theMP_Reach_NLRI has the service label and the service processing manner,so as to determine that the service label is used to identify theservice processing manner.

In a specific implementation, the service processing manner may include:performing load sharing processing on a packet, performing sourceidentification processing on a service flow, performing packet coloringprocessing, or the like. The source identification processing performedon the service flow is mainly used to identify a source of a serviceflow in an operation, administration and maintenance (OAM) process of aservice such as a layer 3 virtual private network (L3VPN). The coloringprocessing is mainly used to color the service flow in the OAM process.A service label allocated for the load sharing processing is an entropylabel (Entropy Label), a service label allocated for the sourceidentification processing is a source label (Source Label), and aservice label allocated for the coloring processing is a color label(Color Label).

For a packet that needs to be forwarded from the source node 202 to thedestination node 203, some service processing may be performed by thecontroller 201, some service processing may be performed by thedestination node 203, and some service processing may be performed by anintermediate node on a forwarding path of the packet. For example, theintermediate node is responsible for performing load sharing processingon the packet, the controller 201 is responsible for performing sourceidentification processing on the packet, and the destination node 203 isresponsible for performing coloring processing on the packet.

In a specific implementation, for the load sharing processing performedby the intermediate node, to implement such a service processing mannerof the load sharing processing, the intermediate node may be configuredto obtain an entropy label of the second packet in a preset manner, andperform the load sharing processing on the second packet according tothe entropy label. The entropy label is a service label that is used toindicate the load sharing processing. The second packet may be formed byinserting, by the source node 202, the entropy label to the first packetas an inner label, that is, the entropy label may be an inner label ofthe second packet. Considering that the intermediate node is usuallyresponsible for only the load sharing processing, the intermediate nodemay not need to identify a service processing manner represented by eachservice label, but need to identify only the entropy label in the secondpacket. Therefore, the intermediate node may identify the entropy labelin the second packet in a manner preset by the intermediate node, anddoes not need to use the mapping relationship that is between theservice label and the service processing manner and that is establishedby the controller. Therefore, the controller 201 does not need todeliver the mapping relationship between the service label and theservice processing manner to the intermediate node. For example, themanner preset by the intermediate node may be that the last label in alabel stack of the second packet may be identified as the entropy label.In this case, the source node 202 may insert the entropy label to thelabel stack of the second packet as the last label in the manner presetby the intermediate node. For another example, the manner preset by theintermediate node may be that a label next to an entropy labelidentifier in the second packet is identified as the entropy label. Inthis case, when inserting the entropy label to the first packet, thesource node 202 may insert the entropy label identifier to the labelstack before the entropy label in the manner preset by the intermediatenode. Certainly, the controller 201 may deliver the mapping relationshipbetween the service label and the service processing manner to theintermediate node, and the intermediate node may identify the entropylabel in the second packet according to the mapping relationshipdelivered by the controller. This is not limited in this embodiment.

In a specific implementation, for the service processing mannerperformed by the controller 201, the controller 201 may determine, basedon the mapping relationship and according to the service label, that thesecond packet is corresponding to the service processing manner, andprocess the second packet in the service processing manner.Specifically, in the process of forwarding the second packet from thesource node 202 to the destination node 203, the controller 201 maycapture the second packet by using one or more forwarding nodes that thesecond packet passes through, to perform service processing on thesecond packet. Considering that the controller 201 is usuallyresponsible for multiple service processing manners, in this case, thecontroller 201 needs to be capable of identifying a service processingmanner represented by each service label. Therefore, when allocating theservice label to the service processing manner, the controller 201 maysave the mapping relationship between the service label and the serviceprocessing manner. When capturing the second packet, the controller 201may determine, according to the saved mapping relationship, the serviceprocessing manner represented by the service label in the second packet,to process the second packet in the determined service processingmanner.

In a specific implementation, for the service processing mannerperformed by the destination node 203, the destination node maydetermine, based on the service label in the mapping relationship, thatthe second packet is corresponding to the service processing manner, andprocess the second packet in the service processing manner. Consideringthat the destination node is usually responsible for multiple serviceprocessing manners, in this case, the destination node 203 needs to becapable of identifying a service processing manner represented by eachservice label. Therefore, the destination node may save the mappingrelationship that is between the service label and the serviceprocessing manner and that is delivered by the controller 201 to thedestination node 203. When receiving the second packet, the destinationnode 203 may determine, according to the mapping relationship, theservice processing manner represented by the service label in the secondpacket, to process the second packet in the determined serviceprocessing manner, and may also identify the service label in the secondpacket, so as to pop the service label from the second packet, to obtainthe first packet, so that the destination node 203 performs subsequentprocessing on the packet. For example, the obtained first packetcontinues to be forwarded along another forwarding path.

In a specific implementation, the network device may process a samepacket in multiple different service processing manners. In this case,the controller 201 may allocate different service labels to differentservice processing manners of a same FEC, and may deliver multipleservice labels corresponding to the same FEC to the source node 202corresponding to the FEC. The source node 202 may insert the multipleservice labels corresponding to the FEC to a packet corresponding to theFEC, so that a network device that is in a network and that needs toperform service processing on the packet processes the packet in theservice processing manners. It can be seen that in a forwarding processof a packet, multiple service labels are inserted to a same packet, sothat a combination of service processing manners can be flexiblyselected for the packet. For example, in a packet label example shown inFIG. 5, an entropy label, a quality of service (QoS) label, a steeringlabel, a VPN prefix label, a VPN label, a color label, and a sourcelabel are inserted to a packet.

When multiple service labels are inserted to a same packet, processingcorresponding to these service processing manners may be performed bymultiple different network devices. In this case, each network devicemay process the packet only in a service processing manner that thenetwork device is responsible for. Certainly, in addition to processingthe second packet in the service processing manner that the destinationnode 203 is responsible for, the destination node 203 further needs topop all service labels from the second packet, to obtain the firstpacket, and perform normal processing on the first packet subsequently.For example, it is assumed that the source node 201 inserts a firstservice label, a second service label, and a third service label to thefirst packet, to obtain the second packet. The first service labelrepresents a first service processing manner that the intermediate nodeis responsible for, the second service label represents a second serviceprocessing manner that the controller 201 is responsible for, and thethird service label represents a third service processing manner of thedestination node 203 is responsible for. In the process of forwardingthe second packet from the source node 202 to the destination node 203,the intermediate node may identify the first service label in the secondpacket and process the second packet in the first service processingmanner, the controller 201 may identify the second service label in thesecond packet and process the second packet in the second serviceprocessing manner, the destination node 203 may identify the thirdservice label in the second packet and process the second packet in thethird service processing manner, and the destination node 203 mayidentify all the three service labels in the second packet and pop thethree service labels from the second packet, so that the first packet isobtained, and a forwarding process of the first packet is completed.

In a specific implementation, any mechanism such as an IP routingmechanism, an MPLS forwarding mechanism, or a segment routing mechanismmay be used to forward a packet having a service label. When the MPLSforwarding mechanism or the segment routing mechanism is used, thepacket is forwarded by using an LSP label. In this case, in a forwardingprocess of the packet, the LSP label of the packet and the service labelmay jointly form a label stack of the packet. Specifically, thecontroller 201 may be further configured to send a next-hop addresscorresponding to the FEC to the source node 202, so as to instruct thesource node 202 to obtain an LSP label corresponding to the next-hopaddress and forward the second packet according to the LSP label. In thelabel stack of the second packet, the LSP label may be an outer label,and the service label may be an inner label. The next-hop addresscorresponding to the FEC represents an address of the destination nodecorresponding to the FEC.

According to the technical solution in this embodiment, in a network inwhich the forwarding node supports MPLS, the controller 201 allocatesthe service label to the service processing manner of the FEC, andestablishes the mapping relationship between the service label and theservice processing manner. On the one hand, the controller 201 sends theservice label to the source node 202 corresponding to the FEC, so thatthe source node 202 may insert the service label to the packetcorresponding to the FEC. On the other hand, the controller 201 may sendthe mapping relationship to the destination node 203 corresponding tothe FEC, so that the destination node 203 may pop, according to themapping relationship, the service label from the packet corresponding tothe FEC. The service label is indication information that is used toidentify the service processing manner, and is used for instructing, inthe forwarding process of the packet, the network device that needs toperform service processing on the packet to process the packet in theservice processing manner. It can be seen that the controller 201allocates the service label, delivers the service label to the sourcenode 202, and delivers the mapping relationship between the servicelabel and the service processing manner to the destination node 203. Foran FEC, the source node 202 corresponding to the FEC can insert, withoutstatic configuration, a service label corresponding to the FEC to apacket corresponding to the FEC, and the destination node 203corresponding to the FEC can pop, without static configuration, theservice label from the packet corresponding to the FEC, so that thepacket corresponding to the FEC can have the service label correspondingto the FEC in a forwarding process, and service processing is performedon the packet by using the service label. Therefore, for each FEC in thenetwork, only the controller 201 needs to be configured, so that serviceprocessing can be performed on a packet corresponding to each FEC, andthe source node 202 and the destination node 203 corresponding to eachFEC do not need to be statically configured. Therefore, a quantity ofdevices that need to be statically configured is reduced significantly,and work of configuring and maintaining service processing for a networkenvironment is simplified. Further, because the work of configuring andmaintaining service processing in the network is simplified, variousservice processing manners can be relatively easily and flexiblyconfigured for each FEC, so that various service processing in thenetwork environment can be flexibly implemented.

Referring to FIG. 6, FIG. 6 is a schematic flowchart of a packetprocessing method according to an embodiment of the present disclosure.The method includes the following steps:

Step 601: A controller allocates a service label to a service processingmanner of an FEC, and establishes a mapping relationship between theservice label and the service processing manner.

Step 602: The controller sends the service label corresponding to theFEC to a source node corresponding to the FEC, so as to instruct thesource node to insert the service label to a first packet correspondingto the FEC, to obtain a second packet.

Step 603: The controller sends the mapping relationship to a destinationnode corresponding to the FEC, so as to instruct the destination node topop the service label from the second packet according to the mappingrelationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

A sequence of performing step 602 and step 603 is not limited in thisembodiment.

Optionally, step 602 may include:

binding, by the controller, the service label to routing informationcorresponding to the FEC, and sending, by the controller, the routinginformation bound with the service label to the source node, so as toinstruct the source node to insert the service label to the firstpacket, to obtain the second packet.

Optionally, for example, step 603 may include:

inserting, by the controller, the service label and the serviceprocessing manner to network layer reachability informationcorresponding to the FEC, to form, in the network layer reachabilityinformation, the mapping relationship between the service label and theservice processing manner, and sending, by the controller, the networklayer reachability information to the destination node, so as toinstruct the destination node to pop the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

Optionally, this embodiment may further include: The controllerdetermines, based on the mapping relationship and according to theservice label, that the second packet is corresponding to the serviceprocessing manner, and the controller processes the second packet in theservice processing manner. The service processing manner is not loadsharing processing.

Optionally, this embodiment may further include: The controller sends anext-hop address corresponding to the FEC to the source node, so as toinstruct the source node to obtain a label switched path (LSP) labelcorresponding to the next-hop address and forward the second packetaccording to the LSP label. In a label stack of the second packet, theLSP label is an outer label, and the service label is an inner label.

It should be noted that for the mapping relationship between the servicelabel and the service processing manner and content of the service labelin this embodiment of the present disclosure, refer to the embodimentshown in FIG. 2. In addition, for various specific implementations inwhich the controller performs the method steps in this embodiment of thepresent disclosure, refer to the detailed description of the embodimentshown in FIG. 2. Details are not described herein.

According to the technical solution in this embodiment, the controllerallocates the service label, delivers the service label to the sourcenode, and delivers the mapping relationship between the service labeland the service processing manner to the destination node. For each FECin a network, only the controller needs to be configured, so thatservice processing can be performed on a packet corresponding to eachFEC, and a source node and a destination node corresponding to each FECdo not need to be statically configured. Therefore, a quantity ofdevices that need to be statically configured is reduced significantly,and work of configuring and maintaining service processing for a networkenvironment is simplified.

Referring to FIG. 7, FIG. 7 is a schematic flowchart of another packetprocessing method according to an embodiment of the present disclosure.The method includes the following steps:

Step 701: A source node receives a service label that is correspondingto an FEC and that is sent by a controller, where the service label isallocated by the controller to a service processing manner of the FEC,and the source node is a source node corresponding to the FEC.

Step 702: The source node receives a first packet corresponding to theFEC, and inserts the service label to the first packet, to obtain asecond packet.

Step 703: The source node sends the second packet to a destination nodecorresponding to the FEC, so as to instruct the destination nodecorresponding to the FEC to pop the service label from the second packetaccording to a mapping relationship between the service label and theservice processing manner, to obtain the first packet, where the mappingrelationship is established by the controller and sent to thedestination node.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, step 701 may include: The source node receives routinginformation that is corresponding to the FEC and that is sent by thecontroller, and the source node obtains the service label bound to therouting information.

Optionally, this embodiment may further include: The source nodereceives a next-hop address that is corresponding to the FEC and that issent by the controller, obtains a label switched path (LSP) labelcorresponding to the next-hop address, and uses the LSP label as an LSPlabel corresponding to the FEC. The second packet is forwarded accordingto the LSP label, and in a label stack of the second packet, the tunnellabel is an outer label, and the service label is an inner label.

It should be noted that for the mapping relationship between the servicelabel and the service processing manner and content of the service labelin this embodiment of the present disclosure, refer to the embodimentshown in FIG. 2. In addition, for various specific implementations inwhich the source node performs the method steps in this embodiment ofthe present disclosure, refer to the detailed description of theembodiment shown in FIG. 2. Details are not described in thisembodiment.

According to the technical solution in this embodiment, the source nodereceives the service label of the service processing mannercorresponding to the FEC from the controller, and the service label isallocated by the controller to the service processing manner of the FEC.The source node inserts the service label to the packet corresponding tothe FEC. Therefore, for each FEC in a network, service processing can beperformed on a packet corresponding to each FEC without staticallyconfiguring a source node corresponding to each FEC. Therefore, aquantity of devices that need to be statically configured is reducedsignificantly, and work of configuring and maintaining serviceprocessing for a network environment is simplified.

Referring to FIG. 8, FIG. 8 is a schematic flowchart of still anotherpacket processing method according to an embodiment of the presentdisclosure. The method includes the following steps:

Step 801: A destination node receives a mapping relationship that isbetween a service label and a service processing manner and that is sentby a controller, where the service label is allocated by the controllerto the service processing manner of an FEC, and the destination node isa destination node corresponding to the FEC.

Step 802: The destination node receives a second packet that is sent bya source node corresponding to the FEC, where the second packet isobtained by inserting, by the source node, the service label to a firstpacket corresponding to the FEC.

Step 803: The destination node pops the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, step 801 may include: The destination node receives networklayer reachability information that is corresponding to the FEC and thatis sent by the controller, and the destination node obtains the servicelabel and the service processing manner from the network layerreachability information, to obtain the mapping relationship between theservice label and the service processing manner.

Optionally, this embodiment may further include: The destination nodedetermines, based on the mapping relationship and according to theservice label, that the second packet is corresponding to the serviceprocessing manner, and the destination node processes the second packetin the service processing manner.

It should be noted that for the mapping relationship between the servicelabel and the service processing manner and content of the service labelin this embodiment of the present disclosure, refer to the embodimentshown in FIG. 2. In addition, for various specific implementations inwhich the destination node performs the method steps in this embodimentof the present disclosure, refer to the detailed description of thesystem embodiment shown in FIG. 2. Details are not described in thisembodiment.

According to the technical solution in this embodiment, the destinationnode receives the mapping relationship that is between the service labeland the service processing manner and that is sent by the controller,and the mapping relationship between the service label and the servicelabel processing manner is pre-established by the controller. Thedestination node may pop, by using the mapping relationship, the servicelabel from the packet corresponding to the FEC. For each FEC in anetwork, service processing can be performed on a packet correspondingto each FEC without statically configuring a destination nodecorresponding to each FEC. Therefore, a quantity of devices that need tobe statically configured is reduced significantly, and work ofconfiguring and maintaining service processing for a network environmentis simplified.

To enable persons skilled in the art to more clearly understand aspecific application manner of the present disclosure, the followingdescribes the embodiments of the present disclosure by using an exampleof an application scenario. In the application scenario, any FEC in anetwork environment is used as a target FEC, and a controller delivers anext-hop address and a service label that are corresponding to thetarget FEC to a source node corresponding to the target FEC, anddelivers a mapping relationship between a service label and a serviceprocessing manner to a destination node corresponding to the target FEC,so that forwarding processing and service processing can be performed,according to an LSP label corresponding to the next-hop address and theservice label, on a packet corresponding to the target FEC. Serviceprocessing manners corresponding to the target FEC include a firstservice processing manner, a second service processing manner, and athird service processing manner. The controller is responsible for thefirst service processing manner, an intermediate node corresponding tothe target FEC is responsible for the second service processing manner,and the destination node corresponding to the target FEC is responsiblefor the third service processing manner. It should be noted that theapplication scenario is merely an example of this embodiment of thepresent disclosure, and this embodiment of the present disclosure is notlimited to the application scenario.

Referring to FIG. 9, FIG. 9 is a schematic flowchart of yet anotherpacket processing method according to an embodiment of the presentdisclosure. This embodiment of the present disclosure may be applied tothe application scenario in the foregoing example, and the methodincludes the following steps.

Step 901: A controller allocates a service label to a service processingmanner of a target FEC.

Specifically, the controller may allocate a first service label to afirst service processing manner of the target FEC, may allocate a secondservice label to a second service processing manner of the target FEC,and may allocate a third service label to a third service processingmanner of the target FEC.

Step 902: The controller establishes a mapping relationship between theservice label and the service processing manner.

Specifically, the controller may establish a mapping relationshipbetween the first service label and the first service processing manneras a first mapping relationship, may establish a mapping relationshipbetween the second service label and the second service processing as asecond mapping relationship, and may establish a mapping relationshipbetween the third service label and the third service processing as athird mapping relationship.

Step 903: The controller generates, according to a next-hop address andthe service label that are corresponding to the target FEC, first NLRIcorresponding to the target FEC, and delivers the first NLRI to a sourcenode corresponding to the target FEC.

Specifically, the next-hop address may be used as routing informationcorresponding to the target FEC, and inserted to an NLRI field of firstnetwork layer reachability information. The first service label, thesecond service label, and the third service label may be used as BGPattributes and bound to the first NLRI. The next-hop address is anaddress of a destination node corresponding to the target FEC.

Step 904: The source node searches for an LSP label according to thenext-hop address, and saves both the LSP label and the service label incorrespondence with the target FEC.

Labels saved by the source node in correspondence with the target FECinclude the LSP label, the first service label, the second servicelabel, and the third service label.

Step 905: The controller generates second NLRI according to the mappingrelationship between the service label and the service processingmanner, and delivers the second NLRI to a destination node correspondingto the target FEC.

Specifically, the controller may generate three pieces of second NLRIthat are corresponding to the foregoing three mapping relationships, anddeliver all the three pieces of second NLRI to the destination node. Inone piece of second NLRI, the first service label is inserted to anSID/Label/Index field, and the first service processing manner isinserted to a type specific value field. In another piece of secondNLRI, the second service label is inserted to an SID/Label/Index field,and the second service processing manner is inserted to a type specificvalue field. In still another piece of second NLRI, the third servicelabel is inserted to an SID/Label/Index field, and the third serviceprocessing manner is inserted to a type specific value field.

Step 906: The destination node saves the received mapping relationship.

Mapping relationships saved by the destination node include the firstmapping relationship, the second mapping relationship, and the thirdmapping relationship.

Step 907: When receiving a first packet corresponding to the target FEC,the source node inserts the LSP label and the service label to the firstpacket, to obtain a second packet.

Specifically, a label stack of the second packet includes the LSP label,the first service label, the second service label, and the third servicelabel. The LSP label is an outer label, and the first service label, thesecond service label, and the third service label are inner labels.

Step 908: The source node forwards the second packet according to theLSP label.

Step 909: When an intermediate node receives the second packet, thecontroller captures the second packet by using the intermediate node.

The intermediate node may be any intermediate node on a forwarding pathof the second packet.

In addition, when the intermediate node receives the second packet, theintermediate node may send the second packet to the controller inresponse to the capturing performed by the controller, that is, performstep 909. Further, the intermediate node may identify the service labelin the second packet and perform service processing on the secondpacket, that is, perform subsequent step 911.

Step 910: The controller identifies the service label in the secondpacket according to the mapping relationship, and processes the secondpacket in a first service processing manner in response toidentification of a first service label.

The controller may identify the first service label in the second packetaccording to the pre-established first mapping relationship, anddetermine that the first service label represents the first serviceprocessing manner, so as to process the second packet in the firstservice processing manner.

It should be understood that, in addition to the first service label,the controller may further identify the second service label and thethird service label in the second packet according to thepre-established second mapping relationship and third mappingrelationship. However, neither the second service processing mannerrepresented by the second service label nor the service processingmanner represented by the third service label needs to be performed bythe controller. Therefore, the controller may not need to performactions in response to instructions of the second service label and thethird service label.

Step 911: When the intermediate node receives the second packet, theintermediate node identifies a second service label in the second packetaccording to fixed configuration, and processes the second packet in asecond service processing manner represented by the second servicelabel.

Specifically, the second service processing manner is load sharingprocessing, and the second service label is an entropy label. Theintermediate node may find the entropy label from the second packetaccording to the fixed configuration, and then, the intermediate nodemay process the entropy label and perform load sharing processing on thesecond packet according to a processing result of the entropy label.

Step 912: The intermediate node forwards the second packet according tothe LSP label.

Step 913: The destination node receives the second packet, andidentifies the service label in the second packet according to themapping relationship.

Specifically, the destination node may identify the first service label,the second service label, and the third service label from the secondpacket according to the pre-stored first mapping relationship, secondmapping relationship, and third mapping relationship.

Step 914: The destination node processes the second packet in a thirdservice processing manner.

Specifically, the destination node may determine, according to thepre-established third mapping relationship, that the third service labelrepresents the third service processing manner, so as to process thesecond packet in the third service processing manner.

Step 915: The destination node pops the service label from the secondpacket, to obtain the first packet.

Specifically, the destination node pops all service labels in the secondpacket from the second packet, that is, the destination node pops thefirst service label, the second service label, and the third servicelabel in the second packet from the second packet.

According to the technical solution in this embodiment, for each FEC ina network environment, only the controller needs to be configured, sothat service processing can be performed on a packet corresponding toeach FEC, and a source node and a destination node corresponding to eachFEC do not need to be statically configured. Therefore, a quantity ofdevices that need to be statically configured is reduced significantly,and work of configuring and maintaining service processing for thenetwork environment is simplified. Further, because the work ofconfiguring and maintaining service processing in the networkenvironment is extremely easy, various service processing manners can berelatively easily and flexibly configured for each FEC, so that variousservice processing in the network environment can be flexiblyimplemented.

Referring to FIG. 10, FIG. 10 is a schematic structural diagram of acontroller 100 according to an embodiment of the present disclosure. Thecontroller 1000 includes:

an allocation module 1001, configured to allocate a service label to aservice processing manner of an FEC;

an establishment module 1002, configured to establish a mappingrelationship between the service label and the service processingmanner;

a first sending module 1003, configured to send the service labelcorresponding to the FEC to a source node corresponding to the FEC, soas to instruct the source node to insert the service label to a firstpacket corresponding to the FEC, to obtain a second packet; and

a second sending module 1004, configured to send the mappingrelationship to a destination node corresponding to the FEC, so as toinstruct the destination node to pop the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

During specific implementation, in the controller 1000, for the serviceprocessing manner of the FEC, the allocation module 1001 may allocatethe service label to the service processing manner of the FEC, theestablishment module 1002 may establish the mapping relationship betweenthe service label that is allocated by the allocation module 1001 andthe service processing manner, the first sending module 1003 maydeliver, to the source node, the service label that is allocated by theallocation module 1001, and the second sending module 1004 may deliverthe mapping relationship established by the establishment module 1002 tothe destination node.

Optionally, the first sending module 1003 may include a bindingsubmodule and a first sending submodule. The binding submodule isconfigured to bind the service label to routing informationcorresponding to the FEC. The first sending submodule is configured tosend the routing information bound with the service label to the sourcenode, so as to instruct the source node to insert the service label tothe first packet, to obtain the second packet.

Optionally, the second sending module 1004 may include an insertionsubmodule and a second sending submodule. The insertion submodule isconfigured to insert the service label and the service processing mannerto network layer reachability information corresponding to the FEC, toform, in the network layer reachability information, the mappingrelationship between the service label and the service processingmanner. The second sending submodule is configured to send the networklayer reachability information to the destination node, so as toinstruct the destination node to pop the service label from the secondpacket according to the mapping relationship, to obtain the firstpacket.

Optionally, the controller 1000 may further include a determining moduleand a service processing module. The determining module is configured todetermine, based on the mapping relationship and according to theservice label, that the second packet is corresponding to the serviceprocessing manner. The service processing module is configured toprocess the second packet in the service processing manner.

Optionally, the controller 1000 may further include a third sendingmodule, configured to send a next-hop address corresponding to the FECto the source node, so as to instruct the source node to obtain a labelswitched path (LSP) label corresponding to the next-hop address andforward the second packet according to the LSP label. In a label stackof the second packet, the LSP label is an outer label, and the servicelabel is an inner label.

It should be noted that the controller 1000 in this embodiment iscorresponding to the controller 201 in the embodiment shown in FIG. 2.For various specific implementations of the controller 1000 in thisembodiment, refer to the detailed description of the embodiment shown inFIG. 2. Details are not described in this embodiment.

According to the technical solution in this embodiment, the controller1000 allocates the service label, delivers the service label to thesource node, and delivers the mapping relationship between the servicelabel and the service processing manner to the destination node. Foreach FEC in a network, only the controller 1000 needs to be configured,so that service processing can be performed on a packet corresponding toeach FEC, and a source node and a destination node corresponding to eachFEC do not need to be statically configured. Therefore, a quantity ofdevices that need to be statically configured is reduced significantly,and work of configuring and maintaining service processing for a networkenvironment is simplified.

Referring to FIG. 11, FIG. 11 is a schematic structural diagram of asource node device 1100 according to an embodiment of the presentdisclosure. The source node device 1100 includes:

a first receiving module 1101, configured to receive a service labelthat is corresponding to an FEC and that is sent by a controller, wherethe service label is allocated by the controller to service processingmanner of the FEC, and the source node is a source node corresponding tothe FEC;

a second receiving module 1102, configured to receive a first packetcorresponding to the FEC;

an insertion module 1103, configured to insert the service label to thefirst packet, to obtain a second packet; and

a first sending module 1104, configured to send the second packet to adestination node corresponding to the FEC, so as to instruct thedestination node corresponding to the FEC to pop the service label fromthe second packet according to a mapping relationship between theservice label and the service processing manner, to obtain the firstpacket, where the mapping relationship is established by the controllerand sent to the destination node.

The service label is used for instructing, in a process of forwardingthe second packet from the source node 1100 to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

During specific implementation, in the source node device 1100, thefirst receiving module 1101 may receive the service label correspondingto the FEC from the controller, the second receiving module 1102 mayreceive the first packet corresponding to the FEC, the first insertionmodule 1103 may insert the service label that is received by the firstreceiving module 1101 to the first packet that is received by the secondreceiving module 1102, to obtain the second packet, and the firstsending module 1104 may send the second packet that is obtained by theinsertion module 1103 to the destination node corresponding to the FEC.

Optionally, the first receiving module 1101, for example, may include afirst receiving submodule and a first obtaining submodule. The firstreceiving submodule is configured to receive routing information that iscorresponding to the FEC and that is sent by the controller. The firstobtaining submodule is configured to obtain the service label bounded tothe routing information.

Optionally, the source node device 1100 may further include: a thirdreceiving module, configured to receive a next-hop address that iscorresponding to the FEC and that is sent by the controller; and anobtaining module, configured to: obtain a label switched path (LSP)label corresponding to the next-hop address, and use the LSP label as anLSP label corresponding to the FEC. The second packet is forwardedaccording to the LSP label, and in a label stack of the second packet,the LSP label is an outer label, and the service label is an innerlabel.

It should be noted that the source node device 1100 in this embodimentis corresponding to the source node 202 in the embodiment shown in FIG.2. For various specific implementations of the source node device 1100in this embodiment, refer to the detailed description of the embodimentshown in FIG. 2. Details are not described in this embodiment.

According to the technical solution in this embodiment, the source nodedevice 1100 may receive the service label by using the controller, toinsert the service label to the packet. For each FEC in a network,service processing can be performed on a packet corresponding to eachFEC without statically configuring the source node device 1100corresponding to each FEC. Therefore, a quantity of devices that need tobe statically configured is reduced significantly, and work ofconfiguring and maintaining service processing for a network environmentis simplified.

Referring to FIG. 12, FIG. 12 is a schematic structural diagram of adestination node device 1200 according to the present disclosure. Thedevice 1200 includes:

a first receiving module 1201, configured to receive a mappingrelationship that is between a service label and a service processingmanner and that is sent by a controller, where the service label isallocated by the controller to the service processing manner of aforwarding equivalence class FEC, and the destination node is adestination node corresponding to the FEC;

a second receiving module 1202, configured to receive a second packetthat is sent by a source node corresponding to the FEC, where the secondpacket is obtained by inserting, by the source node, the service labelto a first packet corresponding to the FEC; and

a popping module 1203, configured to pop the service label from thesecond packet according to the mapping relationship, to obtain the firstpacket.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

During specific implementation, in the destination node device 1200, thefirst receiving module 1201 may receive the mapping relationship betweenthe service label and the service processing manner from the controller,the second receiving module 1202 may receive the second packet to whichthe service label is inserted, and the popping module 1203 may identify,according to the mapping relationship received by the first receivingmodule 1201, the service label from the second packet that is receivedby the second receiving module 1202, and pop the service label from thesecond packet.

Optionally, the first receiving module 1201 may include a secondreceiving submodule and a second obtaining submodule. The secondreceiving submodule is configured to receive network layer reachabilityinformation that is corresponding to the FEC and that is sent by thecontroller. The second obtaining submodule is configured to obtain theservice label and the service processing manner from the network layerreachability information, to obtain the mapping relationship between theservice label and the service processing manner.

Optionally, the destination node device 1200 may further include adetermining module and a service processing module. The determiningmodule is configured to determine, based on the mapping relationship andaccording to the service label, that the second packet is correspondingto the service processing manner. The service processing module isconfigured to process the second packet in the service processingmanner.

It should be noted that the destination node device 1200 in thisembodiment is corresponding to the destination node 203 in theembodiment shown in FIG. 2. For various specific implementations of thedestination node device 1200 in this embodiment, refer to the detaileddescription of the embodiment shown in FIG. 2. Details are not describedin this embodiment.

According to the technical solution in this embodiment, the destinationnode device 1200 may receive the mapping relationship between theservice label and the service processing manner from the controller, topop the service label from the packet. For each FEC in a network,service processing can be performed on a packet corresponding to eachFEC without statically configuring the destination node device 1200corresponding to each FEC. Therefore, a quantity of devices that need tobe statically configured is reduced significantly, and work ofconfiguring and maintaining service processing for a network environmentis simplified.

Referring to FIG. 13, FIG. 13 is a schematic structural diagram of acontroller according to an embodiment of the present disclosure. In thisembodiment, a controller 1300 includes a processor 1301, a memory 1302,a network interface 1303, and a bus system 1304.

The bus system 1304 is configured to couple all hardware components ofthe controller 1300.

The network interface 1303 is configured to implement a communicationconnection between the controller 1300 and at least one other networkelement by using the Internet, a wide area network, a local network, ametropolitan area network, or the like.

The memory 1302 is configured to store a program instruction and data.

The processor 1301 is configured to read the instruction and the datathat are stored in the memory 1302, so as to perform the followingoperations:

The processor 1301 allocates a service label to a service processingmanner of a forwarding equivalence class FEC, and establishes a mappingrelationship between the service label and the service processingmanner;

the processor 1301 sends the service label corresponding to the FEC to asource node corresponding to the FEC, so as to instruct the source nodeto insert the service label to a first packet corresponding to the FEC,to obtain a second packet; and

the processor 1301 sends the mapping relationship to a destination nodecorresponding to the FEC, so as to instruct the destination node to popthe service label from the second packet according to the mappingrelationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, to send the service label corresponding to the FEC to thesource node corresponding to the FEC, so as to instruct the source nodeto insert the service label to the first packet corresponding to theFEC, to obtain the second packet, for example, the processor 1301 mayperform the following operations:

The processor 1301 binds the service label to routing informationcorresponding to the FEC; and

the processor 1301 sends the routing information bound with the servicelabel to the source node, so as to instruct the source node to insertthe service label to the first packet, to obtain the second packet.

Optionally, to send the mapping relationship to the destination nodecorresponding to the FEC, so as to instruct the destination node to popthe service label from the second packet according to the mappingrelationship, to obtain the first packet, for example, the processor1301 may perform the following operations:

The processor 1301 inserts the service label and the service processingmanner to network layer reachability information corresponding to theFEC, to form, in the network layer reachability information, the mappingrelationship between the service label and the service processingmanner; and

the processor 1301 sends the network layer reachability information tothe destination node, so as to instruct the destination node to pop theservice label from the second packet according to the mappingrelationship, to obtain the first packet.

Optionally, for example, the processor 1301 may further perform thefollowing operations:

The processor 1301 determines, based on the mapping relationship andaccording to the service label, that the second packet is correspondingto the service processing manner; and

the processor 1301 processes the second packet in the service processingmanner.

The service processing is not to perform load sharing processing on thepacket, and the network device is the controller.

Optionally, for example, the processor 1301 may further perform thefollowing operation:

The processor 1301 sends a label switched path (LSP) label correspondingto the FEC to the source node, so as to instruct the source node toforward the second packet according to the LSP label.

In a label stack of the second packet, the LSP label is an outer label,and the service label is an inner label.

It should be noted that the controller 1300 in this embodiment iscorresponding to the controller 201 in the embodiment shown in FIG. 2.For various specific implementations of the controller 1300 in thisembodiment, refer to the detailed description of the embodiment shown inFIG. 2. Details are not described in this embodiment.

Referring to FIG. 14, FIG. 14 is a schematic structural diagram of asource node device 1400 according to an embodiment of the presentdisclosure. For example, the source node device 1400 in this embodimentmay include a processor 1401, a memory 1402, a network interface 1403,and a bus system 1404.

The bus system 1404 is configured to couple all hardware components ofthe source node device 1400.

The network interface 1403 is configured to implement a communicationconnection between the forwarding node 1400 and at least one othernetwork element by using the Internet, a wide area network, a localnetwork, a metropolitan area network, or the like.

The memory 1402 is configured to store a program instruction and data.

The processor 1401 is configured to read the instruction and the datathat are stored in the memory 1402, so as to perform the followingoperations:

The processor 1401 receives a service label that is corresponding to aforwarding equivalence class FEC and that is sent by a controller, wherethe service label is allocated by the controller to a service processingmanner of the FEC, and the source node device 1400 is a source nodecorresponding to the FEC;

the processor 1401 receives a first packet corresponding to the FEC, andinserts the service label to the first packet, to obtain a secondpacket; and

the processor 1401 sends the second packet to a destination nodecorresponding to the FEC, so as to instruct the destination nodecorresponding to the FEC to pop the service label from the second packetaccording to a mapping relationship between the service label and theservice processing manner, to obtain the first packet, where the mappingrelationship is established by the controller and sent to thedestination node.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, to receive the service label that is corresponding to theFEC and that is sent by the controller, for example, the processor 1401may perform the following operations:

The processor 1401 receives routing information that is corresponding tothe FEC and that is sent by the controller; and

the processor 1401 obtains the service label bound to the routinginformation.

Optionally, for example, the processor 1401 may further perform thefollowing operation:

The processor 1401 receives a label switched path (LSP) label that iscorresponding to the FEC and that is sent by the controller.

The second packet is forwarded according to the LSP label.

In a label stack of the second packet, the tunnel label is an outerlabel, and the service label is an inner label.

It should be noted that the source node device 1400 in this embodimentis corresponding to the source node 202 in the embodiment shown in FIG.2. For various specific implementations of the source node device 1400in this embodiment, refer to the detailed description of the embodimentshown in FIG. 2. Details are not described in this embodiment.

Referring to FIG. 15, an embodiment of the present disclosure provides aschematic structural diagram of a destination node device 1500. Forexample, the destination node device 1500 in this embodiment may includea processor 1501, a memory 1502, a network interface 1503, and a bussystem 1504.

The bus system 1504 is configured to couple all hardware components ofthe destination node device 1500.

The network interface 1503 is configured to implement a communicationconnection between the destination node device 1500 and at least oneother network element by using the Internet, a wide area network, alocal network, a metropolitan area network, or the like.

The memory 1502 is configured to store a program instruction and data.

The processor 1501 is configured to read the instruction and the datathat are stored in the memory 1502, so as to perform the followingoperations:

The processor 1501 receives a mapping relationship that is between aservice label and a service processing manner and that is sent by acontroller, where the service label is allocated by the controller tothe service processing manner of a forwarding equivalence class FEC, andthe destination node device 1500 is a destination node corresponding tothe FEC;

the processor 1501 receives a second packet that is sent by a sourcenode corresponding to the FEC, where the second packet is obtained byinserting, by the source node, the service label to a first packetcorresponding to the FEC; and

the processor 1501 pops the service label from the second packetaccording to the mapping relationship, to obtain the first packet.

The service label is used for instructing, in a process of forwardingthe second packet from the source node to the destination node, anetwork device that needs to perform service processing on the secondpacket to process the second packet in the service processing manner.

Optionally, to receive the mapping relationship between the servicelabel and the service processing manner, for example, the processor 1501may perform the following operations:

The processor 1501 receives network layer reachability information thatis corresponding to the FEC and that is sent by the controller; and

the processor 1501 obtains the service label and the service processingmanner from the network layer reachability information, to obtain themapping relationship between the service label and the serviceprocessing manner.

Optionally, for example, the processor 1501 may further perform thefollowing operations:

The processor 1501 determines, based on the mapping relationship andaccording to the service label, that the second packet is correspondingto the service processing manner; and

the processor 1501 processes the second packet in the service processingmanner.

The service processing manner is not to perform load sharing processingon the packet, and the network device is the destination node.

It should be noted that the destination node device 1500 in thisembodiment is corresponding to the destination node 203 in theembodiment shown in FIG. 2. For various specific implementations of thedestination node device 1500 in this embodiment, refer to the detaileddescription of the embodiment shown in FIG. 2. Details are not describedin this embodiment.

The word “first” in a first packet and a first sending module that arementioned in the embodiments of the present disclosure is merely used asa name identifier, and does not mean being the first in a sequence. Thisrule is also applicable to the word “second”, “third”, and “fourth”.

It should be noted that the processor in the embodiments of the presentdisclosure may be an integrated circuit chip, and has a signalprocessing capability. In an implementation process, steps in theforegoing methods can be implemented by using a hardware integratedlogical circuit in the processor, or by using instructions in a form ofsoftware. These instructions may be implemented and controlled bycooperation of the processor, and are used to execute the methodsdisclosed in the embodiments of the present disclosure. The processormay also be a general purpose processor, a digital signal processor(DSP), an application-specific integrated circuit (application specificintegrated circuit), a field programmable gate array (FPGA) or anotherprogrammable logical device, a discrete gate or a transistor logicaldevice, or discrete hardware component.

The general purpose processor may be a microprocessor or the processormay be any conventional processor, decoder, or the like. The steps ofthe method disclosed with reference to the embodiments of the presentdisclosure may be directly performed by a hardware processor, or may beperformed by using a combination of hardware in the processor and asoftware module. A software module may be located in a mature storagemedium in the art, such as a random access memory, a flash memory, aread-only memory, a programmable read-only memory, an electricallyerasable programmable memory, a register, or the like.

The bus system may further include a power bus, a control bus, a statussignal bus, and the like in addition to a data bus. However, for cleardescription, various types of buses in FIG. 13, 14 and FIG. 15 aremarked as the bus system.

From the foregoing descriptions of the implementations, persons skilledin the art may clearly understand that some or all steps of the methodsin the embodiments may be implemented by software in addition to auniversal hardware platform. Based on such an understanding, thetechnical solutions of the present disclosure essentially or the partcontributing to the prior art may be implemented in a form of a softwareproduct. The software product may be stored in a storage medium, such asa ROM/RAM, a magnetic disk, or an optical disc, and includes severalinstructions for instructing a computer device (which may be a personalcomputer, a server, or a network device such as media gateway) toperform the methods described in the embodiments or some parts of theembodiments of the present disclosure.

It should be noted that the embodiments in this specification are alldescribed in a progressive manner, for same or similar parts in theembodiments, reference may be made to these embodiments, and eachembodiment focuses on a difference from other embodiments. Especially,method and apparatus embodiments are basically similar to a systemembodiment, and therefore are described briefly. For related parts,refer to partial descriptions in the system embodiment. The describeddevice and system embodiments are merely examples. The modules describedas separate parts may or may not be physically separate, and partsdisplayed as modules may or may not be physical modules, may be locatedin one position, or may be distributed on a plurality of network units.Some or all the modules may be selected according to actual needs toachieve the objectives of the solutions of the embodiments. Persons ofordinary skill in the art may understand and implement the embodimentsof the present disclosure without creative efforts.

The foregoing descriptions are merely implementations of the presentdisclosure, but are not intended to limit the protection scope of thepresent disclosure. It should be noted that persons of ordinary skill inthe art may make certain improvements and polishing without departingfrom the principle of this application and the improvements andpolishing shall fall within the protection scope of this application.

What is claimed is:
 1. A packet processing method, comprising:allocating, by a controller, a service label to a service processingmanner of a forwarding equivalence class (FEC), and establishing amapping relationship between the service label and the serviceprocessing manner; sending, by the controller, the service labelcorresponding to the FEC to a source node to enable the source node toinsert the service label to a first packet corresponding to the FEC, toobtain a second packet; wherein the service label instructs, in aprocess of forwarding the second packet from the source node to adestination node, a network device that performs service processing onthe second packet to process the second packet in the service processingmanner.
 2. The method according to claim 1, wherein: the sending, by thecontroller, the service label corresponding to the FEC to a source nodecorresponding to the FEC to instruct the source node to insert theservice label to a first packet corresponding to the FEC, to obtain asecond packet comprises: binding, by the controller, the service labelto routing information corresponding to the FEC; and sending, by thecontroller, the routing information bound with the service label to thesource node to enable the source node to insert the service label to thefirst packet, to obtain the second packet.
 3. The method according toclaim 1, wherein: the sending, by the controller, the mappingrelationship to the destination node corresponding to the FEC to enablethe destination node to pop the service label from the second packetaccording to the mapping relationship, to obtain the first packetcomprises: inserting, by the controller, the service label and theservice processing manner to network layer reachability informationcorresponding to the FEC, to form the mapping relationship between theservice label and the service processing manner; and sending, by thecontroller, the network layer reachability information to thedestination node to enable the destination node to pop the service labelfrom the second packet according to the mapping relationship, to obtainthe first packet.
 4. The method according to claim 1, furthercomprising: sending, by the controller, a next-hop address correspondingto the FEC to the source node to enable the source node to obtain alabel switched path (LSP) label corresponding to the next-hop addressand forward the second packet according to the LSP label; wherein in alabel stack of the second packet, the LSP label is an outer label, andthe service label is an inner label.
 5. A packet processing method,comprising: receiving, by a source node, a service label correspondingto a forwarding equivalence class (FEC) sent by a controller, whereinthe service label is allocated by the controller to a service processingmanner of the FEC, and the source node is a source node corresponding tothe FEC; receiving, by the source node, a first packet corresponding tothe FEC, and inserting the service label to the first packet, to obtaina second packet; and sending, by the source node, the second packet to adestination node corresponding to the FEC; wherein the service labelinstructs, in a process of forwarding the second packet from the sourcenode to the destination node, a network device that performs serviceprocessing on the second packet to process the second packet in theservice processing manner.
 6. The method according to claim 5, whereinthe receiving, by a source node, a service label that is correspondingto an FEC and that is sent by a controller comprises: receiving, by thesource node, routing information corresponding to the FEC sent by thecontroller; and obtaining, by the source node, the service label boundto the routing information.
 7. The method according to claim 5, furthercomprising: receiving, by the source node, a next-hop addresscorresponding to the FEC sent by the controller, obtaining a labelswitched path (LSP) label corresponding to the next-hop address, andusing the LSP label as an LSP label corresponding to the FEC; whereinthe second packet is forwarded according to the LSP label; and in alabel stack of the second packet, the LSP label is an outer label, andthe service label is an inner label.
 8. A controller, comprising: aprocessor; and a computer-readable storage medium storing a program tobe executed by the processor, the program including instructions, whenexecuted by the processor, cause the processor to: allocate a servicelabel to a service processing manner of a forwarding equivalence class(FEC); establish a mapping relationship between the service label andthe service processing manner; send the service label corresponding tothe FEC to a source node corresponding to the FEC to enable the sourcenode to insert the service label to a first packet corresponding to theFEC, to obtain a second packet; and send the mapping relationship to adestination node corresponding to the FEC to enable the destination nodeto pop the service label from the second packet according to the mappingrelationship, to obtain the first packet; wherein the service labelinstructs, in a process of forwarding the second packet from the sourcenode to the destination node, a network device that performs serviceprocessing on the second packet to process the second packet in theservice processing manner.
 9. The controller according to claim 8,wherein the program includes further instructions that, when executed,cause the processor to: bind the service label to routing informationcorresponding to the FEC; and send the routing information bound withthe service label to the source node to enable the source node to insertthe service label to the first packet, to obtain the second packet. 10.The controller according to claim 8, wherein the program includesfurther instructions that, when executed, cause the processor to: insertthe service label and the service processing manner to network layerreachability information corresponding to the FEC, to form, in thenetwork layer reachability information, the mapping relationship betweenthe service label and the service processing manner; and send thenetwork layer reachability information to the destination node to enablethe destination node to pop the service label from the second packetaccording to the mapping relationship, to obtain the first packet. 11.The controller according to claim 8, wherein the program includesfurther instructions that, when executed, cause the processor to: send anext-hop address corresponding to the FEC to the source node to enablethe source node to obtain a label switched path (LSP) labelcorresponding to the next-hop address and forward the second packetaccording to the LSP label; wherein in a label stack of the secondpacket, the LSP label is an outer label, and the service label is aninner label.
 12. A source node device, comprising: a processor; and acomputer-readable storage medium storing a program to be executed by theprocessor, the program including instructions that, when executed by theprocessor, cause the processor to: receive a service label correspondingto a forwarding equivalence class (FEC) sent by a controller, whereinthe service label is allocated by the controller to a service processingmanner of the FEC, and the source node device is a source nodecorresponding to the FEC; receive a first packet corresponding to theFEC, and inserting the service label to the first packet, to obtain asecond packet; and send the second packet to a destination nodecorresponding to the FEC; wherein the service label instructs, in aprocess of forwarding the second packet from the source node to thedestination node, a network device that performs service processing onthe second packet to process the second packet in the service processingmanner.
 13. The source node device according to claim 12, wherein theprogram includes further instructions that, when executed, cause theprocessor to: receive routing information that is corresponding to theFEC and that is sent by the controller; and obtain the service labelbound to the routing information.
 14. The source node device accordingto claim 12, wherein the program includes further instructions that,when executed, cause the processor to: receive a next-hop address thatis corresponding to the FEC and that is sent by the controller,obtaining a label switched path (LSP) label corresponding to thenext-hop address, and using the LSP label as an LSP label correspondingto the FEC; wherein the second packet is forwarded according to the LSPlabel; and in a label stack of the second packet, the LSP label is anouter label, and the service label is an inner label.